function param = DLBPk_prepare_finish(param, stat, count)
    q = stat.value / sum(stat.value);
    v = sort(q, 'descend');
    i = 0;
    s = 0;
    while (i < length(q) && s < param.ratio)
        i = i + 1;
        s = s + v(i);
    end
    t = v(i);
    param.mapping = (q >= t);
end